#ifndef COUNTDOWN_H
#define COUNTDOWN_H
#include "./borderprogresslabel.h"
#include "global.h"
class CountDown : public PreventCloseWindow
{
	Q_OBJECT
public:
	CountDown(QWidget *parent = nullptr);
	~CountDown();
protected:
	QPoint m_point;
	int cursorPosX, cursorPosY;
private slots:
	void timerUpdata();
	void GanFanUpdata();
	void updateMouseTransparency();
	void spawnBarrage();
private:
	void trans();
	long double remainingSeconds, currentTimestamp;
	bool isFullScreenProgressActive = 1, isFullScreenMode = 0, isPositionChanged = 0, isChanging = 0;
	char barrageCounter = 0;
	char colon = ':';
	int displayDuration = 0, timestrY = 50;
	const int HOLIDAY_INTERVAL = 5;
	BorderProgressLabel *timestr = new BorderProgressLabel(this), *ganfan = new BorderProgressLabel(this);
	QTimer *timer3 = new QTimer(this), *mouseTimer = new QTimer(this), *masterTimer = new QTimer(this), *danmuTimer = new QTimer(this);
	std::string week[7] = {"周一", "周二", "周三", "周四", "周五", "周六", "周日"};
	QStringList holidays, subjects;
	BorderLabel *danmuLabel = new BorderLabel(this);
	QStringList danmuQueue;
	bool isDanmuAnimating = false;
};
#endif
